<?php

class Core_Data_UDD_Structure_Document {

    private $TableCollection;

    private $strFilename;
    private $strProjectName;
    private $strProjectVersion;
    private $intRevision;

    function __construct ( $strFilename ) {
        $this->TableCollection = new ArrayObject ();
        $this->strFilename = $strFilename;
    }

    /**
     * Appends a table to the document.
     *
     * @param Core_Data_UDD_Structure_Table $objTable
     */
    public function appendTable ( Core_Data_UDD_Structure_Table $objTable ) {
        $this->TableCollection[$objTable->__toString()] = $objTable;
    }

    /**
     * Gets the filename.
     *
     * @return string
     */
    public function getFilename () {
        return $this->strFilename;
    }

    /**
     * Gets the project name.
     *
     * @return string
     */
    public function getProjectName () {
        return $this->strProjectName;
    }

    /**
     * Sets the project name.
     *
     * @param string $strProjectName
     */
    public function setProjectName ( $strProjectName ) {
        $this->strProjectName = $strProjectName;
    }

    /**
     * Gets the project version.
     *
     * @return string
     */
    public function getProjectVersion () {
        return $this->strProjectVersion;
    }

    /**
     * Sets the project version.
     *
     * @param string $strProjectVersion
     */
    public function setProjectVersion ( $strProjectVersion ) {
        $this->strProjectVersion = $strProjectVersion;
    }

    /**
     * Gets the revision.
     *
     * @return string
     */
    public function getRevision () {
        return $this->intRevision;
    }

    /**
     * Sets the revision.
     *
     * @param integer $strRevision
     */
    public function setRevision ( $intRevision ) {
        $this->intRevision = $intRevision;
    }

    /**
     * Gets the tables in the document.
     *
     * @return ArrayObject
     */
    public function tables () {
        return $this->TableCollection;
    }

}

?>
